function getSession(a) {
  let b = window.sessionStorage.getItem(a)
  return JSON.parse(b)
}
function setSession(key, value) {
  window.sessionStorage.setItem(key, JSON.stringify(value))
}
function getLocal(key) {
  let value = window.localStorage.getItem(key)
  return JSON.parse(value)
}

function setLocal(key, value) {
  window.localStorage.setItem(key, JSON.stringify(value))
}

function removeSession(key) {
  window.sessionStorage.removeItem(key)
}
function removeLocal(key) {
  window.localStorage.removeItem(key)
}

export default {
  setLocal,
  setSession,
  getLocal,
  getSession,
  removeSession,
  removeLocal,
}
